import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '名称',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '位置',
    align: "center",
    dataIndex: 'positionId_dictText'
  },
  {
    title: '轮播图',
    align: "center",
    dataIndex: 'image',
    customRender: render.renderImage,
  },
  {
    title: '是否轮播',
    align: "center",
    dataIndex: 'lunboStatus',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]);
     },
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: {title: '名称',order: 0,view: 'text', type: 'string',},
  positionId: {title: '位置',order: 1,view: 'sel_tree', type: 'string',dict: 'cms_lunbo_position,position,id', pidValue: '0',},
  image: {title: '轮播图',order: 2,view: 'image', type: 'string',},
  lunboStatus: {title: '是否轮播',order: 3,view: 'switch', type: 'string',},
};
